home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Resources / Burning & Media / GB-PVR 1.2.13 / GBPVR10213.msi / Cabs.w1.cab / GuideListingChannel.cs501 < prev    next >
Text File  |  2008-02-22  |  7KB  |  212 lines

  1. /// <summary>
  2. /// This object is used to format the first block of the guide which contains the channel information
  3. /// </summary>
  4. namespace gbweb.classes
  5. {
  6.     public class GuideListingChannel
  7.     {
  8.         private const string fill0 = "<div class=\"";
  9.         private string displayClass = "channelInfoLogoAndText";
  10.         private string fill1 = "\" title=\"";
  11.         private string displayTitle = "";
  12.         private const string fill2 = "\" style=\"width:";
  13.         private int displayWidth = 8;
  14.         private const string fill3 = "%\">";
  15.         private const string fill4 = "<div class=\"nameAndNumber\"><a href=\"";
  16.         private string channelHref = "";
  17.         private const string fill5 = ">";
  18.         private string channelNumber = "";
  19.         private const string fill6 = " ";
  20.         private string channelName = "";
  21.         private const string fill7 = "</a></div>\n";
  22.         private const string fill8 = "<div class=\"channelLogo\"> <a href=\"";
  23.         private string channelLogoHref = "";
  24.         private const string fill9 = "\"><img src=\"";
  25.         private string channelLogoImgSrc = "";
  26.         private const string fill10 = "\" width=\"";
  27.         private int channelLogoImgWidth = 90;
  28.         private const string fill11 = "% hspace=\"";
  29.         private int channelLogoImgHspace = 0;
  30.         private const string fill12 = "\" vspace=\"";
  31.         private int channelLogoImgVspace = 0;
  32.         private const string fill13 = "\" border=\"";
  33.         private int channelLogoImgBorder = 1;
  34.         private const string fill14 = "\"></a></div>\n";
  35.         private const string fill15 = "</div>\n";
  36.         
  37.         public GuideListingChannel()
  38.         {
  39.         }
  40.  
  41.         public GuideListingChannel(string DisplayClass, string DisplayTitle, int DisplayWidth,
  42.                                    string ChannelHref, string ChannelName, string ChannelNumber,
  43.                                    string ChannelLogoHref, string ChannelLogoImgSrc, int ChannelLogoImgWidth,
  44.                                    int ChannelLogoImgHspace, int ChannelLogoImgVspace, int ChannelLogoImgBorder)
  45.         {
  46.             displayClass = DisplayClass;
  47.             displayTitle = DisplayTitle;
  48.             displayWidth = DisplayWidth;
  49.             channelHref = ChannelHref;
  50.             channelName = ChannelName;
  51.             channelNumber = ChannelNumber;
  52.             channelLogoHref = ChannelLogoHref;
  53.             channelLogoImgSrc = ChannelLogoImgSrc;
  54.             channelLogoImgWidth = ChannelLogoImgWidth;
  55.             channelLogoImgHspace = ChannelLogoImgHspace;
  56.             channelLogoImgVspace = ChannelLogoImgVspace;
  57.             channelLogoImgBorder = ChannelLogoImgBorder;
  58.         }
  59.  
  60.         public string getChannelLine()
  61.         {
  62.             string returnLine = string.Empty;
  63.             returnLine += fill0;
  64.             returnLine += displayClass;
  65.             returnLine += fill1;
  66.             returnLine += displayTitle;
  67.             returnLine += fill2;
  68.             returnLine += displayWidth;
  69.             returnLine += fill3;
  70.  
  71.             if (displayClass == "channelInfoLogoAndText" || displayClass == "channelInfo")
  72.             {
  73.                 returnLine += fill4;
  74.                 returnLine += channelHref;
  75.                 returnLine += fill5;
  76.                 returnLine += channelName;
  77.                 returnLine += fill6;
  78.                 returnLine += channelNumber;
  79.                 returnLine += fill7;
  80.             }
  81.             if (displayClass == "channelInfoLogoAndText" || displayClass == "channelInfoLogoOnly")
  82.             {
  83.                 returnLine += fill8;
  84.                 returnLine += channelLogoHref;
  85.                 returnLine += fill9;
  86.                 returnLine += channelLogoImgSrc;
  87.                 returnLine += fill10;
  88.                 returnLine += channelLogoImgWidth;
  89.                 returnLine += fill11;
  90.                 returnLine += channelLogoImgHspace;
  91.                 returnLine += fill12;
  92.                 returnLine += channelLogoImgVspace;
  93.                 returnLine += fill13;
  94.                 returnLine += channelLogoImgBorder;
  95.                 returnLine += fill14;
  96.             }
  97.  
  98.             returnLine += fill15;
  99.  
  100.             return returnLine;
  101.         }
  102.  
  103.         public string getDisplayClass()
  104.         {
  105.             return displayClass;
  106.         }
  107.         public void setDisplayClass(string a)
  108.         {
  109.             displayClass = a;
  110.         }
  111.  
  112.         public string getDisplayTitle()
  113.         {
  114.             return displayTitle;
  115.         }
  116.         public void setDisplayTitle(string a)
  117.         {
  118.             displayTitle = a;
  119.         }
  120.  
  121.         public int getDisplayWidth()
  122.         {
  123.             return displayWidth;
  124.         }
  125.         public void setDisplayWidth(int a)
  126.         {
  127.             displayWidth = a;
  128.         }
  129.  
  130.         public string getChannelHref()
  131.         {
  132.             return channelHref;
  133.         }
  134.         public void setChannelHref(string a)
  135.         {
  136.             channelHref = a;
  137.         }
  138.  
  139.         public string getChannelName()
  140.         {
  141.             return channelName;
  142.         }
  143.         public void setChannelName(string a)
  144.         {
  145.             channelName = a;
  146.         }
  147.  
  148.         public string getChannelNumber()
  149.         {
  150.             return channelNumber;
  151.         }
  152.         public void setChannelNumber(string a)
  153.         {
  154.             channelNumber = a;
  155.         }
  156.  
  157.         public string getChannelLogoHRef()
  158.         {
  159.             return channelLogoHref;
  160.         }
  161.         public void setChannelLogHref(string a)
  162.         {
  163.             channelLogoHref = a;
  164.         }
  165.  
  166.         public string getChannelLogoImgSrc()
  167.         {
  168.             return channelLogoImgSrc;
  169.         }
  170.         public void setChannelLogoImgSrc(string a)
  171.         {
  172.             channelLogoImgSrc = a;
  173.         }
  174.  
  175.         public int getChannelLogoImgWidth()
  176.         {
  177.             return channelLogoImgWidth;
  178.         }
  179.         public void setChannelLogoImgWidth(int a)
  180.         {
  181.             channelLogoImgWidth = a;
  182.         }
  183.  
  184.         public int getChannelLogoImgHspace()
  185.         {
  186.             return channelLogoImgHspace;
  187.         }
  188.         public void setChannelLogoImgHspace(int a)
  189.         {
  190.             channelLogoImgHspace = a;
  191.         }
  192.  
  193.         public int getChannelLogoImgVspace()
  194.         {
  195.             return channelLogoImgVspace;
  196.         }
  197.         public void setChannelLogoImgVspace(int a)
  198.         {
  199.             channelLogoImgVspace = a;
  200.         }
  201.  
  202.         public int getChannelLogoImgBorder()
  203.         {
  204.             return channelLogoImgBorder;
  205.         }
  206.         public void setChannelLogoImgBorder(int a)
  207.         {
  208.             channelLogoImgBorder = a;
  209.         }
  210.     }
  211. }
  212.